<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>	
	<div class="row">
		<?php echo $form->label($model,'department'); ?>
		<?php echo $form->textField($model,'department',array('size'=>60,'maxlength'=>256)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'received_time'); ?>
		<?php //echo $form->textField($model,'received_time'); ?>
		<?php
			$form->widget('zii.widgets.jui.CJuiDatePicker', array(
					'name'=>CHtml::activeName($model,'received_time'),   
					'model'=>$model,
					'attribute'=>'received_time',
					'options' => array(
						'dateFormat' => 'dd-mm-yy',
						'showAnim'   => 'fold',
						'showOn'     =>'button',
						'buttonText' =>Yii::t('ui','Select form calendar'),
						'buttonImage'=>Yii::app()->request->baseUrl.'/images/calendar.png',
						'buttonImageOnly'=>true,
					),
					'htmlOptions'=>array(
						'style'=>'width:80px;vertical-align:top;'
					),
				));
			?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'finished_time'); ?>
		<?php //echo $form->textField($model,'finished_time'); ?>
		<?php
			$form->widget('zii.widgets.jui.CJuiDatePicker', array(
					'name'=>CHtml::activeName($model,'finished_time'),   
					'model'=>$model,
					'attribute'=>'finished_time',
					'options' => array(
						'dateFormat' => 'dd-mm-yy',
						'showAnim'   => 'fold',
						'showOn'     =>'button',
						'buttonText' =>Yii::t('ui','Select form calendar'),
						'buttonImage'=>Yii::app()->request->baseUrl.'/images/calendar.png',
						'buttonImageOnly'=>true,
					),
					'htmlOptions'=>array(
						'style'=>'width:80px;vertical-align:top;'
					),
				));
			?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'job_group_id'); ?>
		<?php echo $form->dropDownList($model,'job_group_id', CHtml::listData(JobGroup::model()->findAll(), 'id', 'name') , array('empty'=>'Tất cả các nhóm')); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'detail'); ?>
		<?php echo $form->textArea($model,'detail',array('rows'=>6, 'cols'=>50)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'job_type_id'); ?>
		<?php echo $form->dropDownList($model,'job_type_id', CHtml::listData(JobType::model()->findAll(), 'id', 'name') , array('empty'=>'Tất cả')); ?>
		<?php //echo $form->textField($model,'job_type_id',array('size'=>10,'maxlength'=>10)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'is_deleted'); ?>
		<?php //echo $form->textField($model,'is_deleted'); ?>
		<?php echo $form->dropDownList($model,'is_deleted', array(0 => 'Chưa xóa' , 1=>'Đã xóa') , array('prompt'=>'Tất cả')); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'solution'); ?>
		<?php echo $form->textArea($model,'solution',array('rows'=>6, 'cols'=>50)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'user_id'); ?>
		<?php //echo $form->textField($model,'user_id',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->dropDownList($model,'user_id', CHtml::listData(user::model()->findAllbySql('SELECT id, CONCAT(username, "-", full_name) as full_name FROM hd_user WHERE user_type_id = 1'
							), 'id', 'full_name') , array('prompt'=>'Tất cả')); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Search'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- search-form -->